﻿using System;
using System.ComponentModel.DataAnnotations;

namespace xmgl.Models
{
    public class User : BaseModels
    {
        /// <summary>
        /// 用户编号
        /// </summary>
        [Key]
        public int Id { get; set; }
        /// <summary>
        /// 登录名
        /// </summary>
        [Required(ErrorMessage = "请输入登录名")]
        public string LoginName { get; set; }
        /// <summary>
        /// 用户密码
        /// </summary>
        [MaxLength(20), MinLength(6)]
        public string Password { get; set; }
        /// <summary>
        /// 用户邮箱
        /// </summary>
        [MaxLength(50)]
        public string Email { get; set; }
        /// <summary>
        /// 用户手机号
        /// </summary>
        [MaxLength(13)]
        public string Phone { get; set; }
        /// <summary>
        /// 是否有效
        /// </summary>
        [MaxLength(3)]
        public string State { get; set; }
        /// <summary>
        /// 登录时间
        /// </summary>
        public DateTime LoginTime { get; set; }
        /// <summary>
        /// 用户姓名
        /// </summary>
        [MaxLength(50)]
        public string Name { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(200)]
        public string Note { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [MaxLength(50)]
        public string Creater { get; set; }
        /// <summary>
        /// 操作时间
        /// </summary>
        public DateTime OperTime { get; set; }
        /// <summary>
        /// 操作人
        /// </summary>
        [MaxLength(50)]
        public string Oper { get; set; }

    }
}